#ifndef TESTCAMERA_H
#define TESTCAMERA_H

#include "GENCamera.h"
#include <QString>
class TestCamera:GENCamera
{
public:
    TestCamera();
    ~TestCamera();
    bool openCamera();
    bool closeCamera();
    QImage* getPicture();
    bool isAvailable();

//默认拍摄图片都是空图片，如果要设置制定图片，需要设置图片路径，%d表示格式化字符串
    void setImageStringFormat(QString stringFormat);//比如“./%d.jpg”
    void setCount(int cnt);//设置基数，每capture一次就cnt++
private:
    bool init();
    bool available = false;
    bool inited = false;
    int imageCount = 0;
    QString imageStringFormat = "";
};

#endif // TESTCAMERA_H
